<template>
  <!--充值订单页面-->
  <div>
    <wv-panel>
      <wv-media-box :thumb="src" title="充值订单"
                    :description="rechargePrice+'元'"></wv-media-box>
    </wv-panel>
    <div class="divider"></div>
    <wv-group>
      <wv-cell title="总计" :value="rechargePrice+'元'" class="total"/>
    </wv-group>
    <div class="divider"></div>
    <offer :goodsList="goodsList" :resultPrice="rechargePrice" :buySource="1" showPayWay="PAY_WX"></offer>
  </div>
</template>

<script type="text/ecmascript-6">
  import offer from '../offertemplate/offertemplate'

  export default {
    name: 'rechargeorder',
    props: {},
    data() {
      return {
        src: require('../../assets/wallet.png'),
        number: 1,
        goodsList: [],
        rechargePrice: ''
      };
    },
    methods: {},
    created() {
      let rechargePrice = this.$route.query.rechargePrice;
      this.rechargePrice = rechargePrice;
      let goods = {unitPrice: rechargePrice, orderType: 6, goodsNum: 1}
      this.goodsList.push(goods)
    },
    components: {
      offer
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less" rel="stylesheet/less">
  .divider {
    height: 10px;
    background-color: #eee;
  }
</style>
